<template>
    <div class="about">
        <h1>This is an about page</h1>
        <input type="text" v-model="msg" />
        <button @click="ajaxPostDataDemo">按钮</button>
    </div>
</template>
<script>
export default {
    name: 'Index',
    data() {
        return {
            msg: '',
            yzm: null
        };
    },
    mounted() {
        /**/
    },
    methods: {
        /*接口实现*/
        ajaxPostDataDemo() {
            this.$api
                .ajaxData({
                    pathName: 'getYzm',
                    data: {
                        phone: this.msg
                    }
                })
                .then(res => {
                    let data = res;
                    this.$util.alert(data);
                });
        }
    }
};
</script>
